<template>
	<el-dialog
	  :title="title"
	  :visible.sync="curDialog"
	  class="over-loading"
	  :width="width"
	  :close-on-press-escape="false"
	  :close-on-click-modal="false"
	>
	  <div class="dialog-content">
	    <div v-html="content" :style="'height:' + height" style="overflow-y: auto;padding:10px;"></div>
	  </div>
	</el-dialog>
</template>

<script>
	import common from "../../utils/common.js"
	export default {
		name:"gz-yulan",
		props:{
			width:{
				default:'30%'
			},
			height:{
				default:()=>{
					let screenInfo = common.getScreenInfo()
					return screenInfo.height*0.7 + "px"
				},
				
			}
		},
		data(){
			return{
				title:"",
				content:"",
				curDialog:false
			}
		},
		methods:{
			open(params){
				this.title = params.title
				this.content = params.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
				this.curDialog = true
			},
		}
	}
</script>

<style lang="scss" scoped>
</style>